package com.mayikt.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;
import java.util.ArrayList;
import java.util.Map;

@Controller
public class FreemarkerIndexController {

    @RequestMapping("/freemarkerIndex")
    public String freemarkerIndex(Map<String,Object> result, HttpServletRequest request){
        result.put("name","taozi");
        result.put("sex","1");
        result.put("age",29);
        ArrayList<String> userList = new ArrayList<>();
        userList.add("土豆");
        userList.add("麻麻");

        result.put("userList",userList);
        return "freemarkerIndex";
    }
}
